package org.springframework.validation.mvc.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;


/**
 * When annotating a controller method, the value
 * is a string that indicates the view that should follow
 * failed validation on an @Valid annotated model, overriding any previously
 * evaluated view names.
 * Useful when you want your service and controller methods to be synonomous,
 * because it allows an error view to be set without manually checking bindingResult.
 * View name may contain restful variable syntax, where "{foo}" will be replaced
 * by by some property named "foo" from the model and view object.
 * If a single controller method handles multiple request paths, the error view can
 * be wired dependent on the path by specifying "someInputPath=someErrorPath", in an array.
 * Requires that AnnotatedErrorViewValidationFailureRedirector be a wired bean. 
 * @author Clark Duplichien
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface ValidationFailureView {
	public String[] value();
	
}
